<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="../common.inc" %>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="./css/style1.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="./css/fusionCharts.css" type="text/css" />
<script language="JavaScript" src="./js/FusionCharts.js"></script>
<script language="JavaScript" src="./js/sale-monitor.js"></script>
<script type="text/javascript" src="./js/form.js"></script>
<script type="text/javascript" language="javascript">
<!--
	function back(){
		window.location.href = "customerReport.html";
		window.location.target = "main";
	}
	
	function pageCustomer(flag){
		document.funnelCustomerForm.action = "./saleFunnel.do?action=funnelCustomers&flag="+flag;
		document.funnelCustomerForm.target = "fCustomerFrame";
		document.funnelCustomerForm.submit();
	}
-->
</script>
</head>
<body style="margin: 0 0 0 0;">
<form name="funnelCustomerForm" action="" method="post">
	<div style="width:100%;height:165px;overflow-x: hidden;overflow-y: scroll;">
	<table class="table_style">
		<tr>
			<td class="title" width="8"></td>
			<td class="title">客户名称</td>
			<td class="title" width="12%">联系次数</td>
			<td class="title" width="12%">预测金额(元)</td>
			<td class="title" width="15%">预测签约</td>
			<td class="title" width="15%">最后联系</td>
		</tr>
		<c:choose>
		<c:when test="${not empty customers}">
		<c:forEach var="customer" items="${customers}">
		<tr onmouseover="onmousemoveChange(this,'img${customer.id}')" onmouseout="onmouseoutChange(this,'img${customer.id}')">
												<td height="16" width="8" align="right"><img id="img${customer.id}" src="./images/table_sign2.bmp"></td>
			<td align="left">
				<a style="font-weight: normal;text-decoration: underline;color: blue;" href="./customerManage.do?action=customerDetail&customerId=${customer.id}&sign=81" target="main" hidefocus="true">${customer.customerName}
			</td>
			<td>${customer.linkNum}</td>
			<td>${customer.predictCost}</td>
			<td><fmt:formatDate value="${customer.predictContract}" pattern="yyyy-MM-dd"/></td>
			<td><fmt:formatDate value="${customer.lastLink}" pattern="yyyy-MM-dd"/></td>
		</tr>
		</c:forEach>
		</c:when>
		<c:otherwise><tr><td align="center" colspan="6">暂无信息！</td></tr></c:otherwise>
		</c:choose>
	</table>
	
	<!-- page -->
	<table id="tp" class="table_page" style="text-align: left;">
		<tr>
			<td>&nbsp;&nbsp;
				<img src="./images/frist.bmp" onclick="pageCustomer(1)" alt="首页" style="vertical-align: middle;cursor: hand;">
				<img src="./images/last.bmp" onclick="pageCustomer(2)" alt="上一页" style="vertical-align: middle;cursor: hand;">&nbsp;
				<font color="red">${currentPage}</font>/${totalPages}&nbsp;<fmt:message key='common.page'/>&nbsp;
				<img src="./images/next.bmp" onclick="pageCustomer(3)" alt="下一页" style="vertical-align: middle;cursor: hand;">
				<img src="./images/end.bmp" onclick="pageCustomer(4)" alt="末页" style="vertical-align: middle;cursor: hand;">
				共&nbsp;&nbsp;${totalRows}&nbsp;<fmt:message key='common.page.totalRow'/>
			</td>
		</tr>
	</table>
	</div>
	<input id="saleStageId" name="saleStageId" type="hidden" value="${saleStageId}"/>
	<input id="funnelTarget" name="funnelTarget" type="hidden" value="${saleFunnelForm.funnelTarget}"/>
	<input id="salePersonId" name="salePersonId" type="hidden" value="${saleFunnelForm.salePersonId}"/>
	<input id="time" name="time" type="hidden" value="${saleFunnelForm.time}"/>
</form>
</body>
</html>